package com.example.demo.common;
import java.text.SimpleDateFormat;
import java.util.Date;
    /**
     * 日期工具类
     */
    public class DateUtil {

        public static String getCurrentDateStr(String pattern){
            SimpleDateFormat format=new SimpleDateFormat(pattern);
            String currentDateStr = format.format(new Date());
            return currentDateStr;
        }
    }



